<template>
  <div class="detail">
    <div class="pager-title">{{$route.meta.title}}</div>
    <div class="h2 line">申请CA证书信息 <span class="tips danger-text">（申请CA证书需要验证您的实名信息）</span></div>
    <div class="form">
      <el-form :model="companyInfo" label-width="130px">
        <el-form-item label="真实姓名：">
          <el-input :disabled="true" v-model="companyInfo.name"></el-input>
        </el-form-item>
        <el-form-item label="身份证号码：">
          <el-input :disabled="true" v-model="companyInfo.id_card_number"></el-input>
        </el-form-item>
        <el-form-item label="银行卡号：">
          <el-input :disabled="true" v-model="companyInfo.bank_number"></el-input>
        </el-form-item>
        <el-form-item label="银行预留手机号：">
          <el-input style="width: 200px; margin-right: 10px;" v-model="companyInfo.bank_phone" placeholder="请输入银行预留手机号"></el-input>
          <el-button type="primary">获取验证码</el-button>
        </el-form-item>
        <el-form-item label="验证码：">
          <el-input style="width: 200px;" v-model="code" placeholder="请输入验证码"></el-input>
        </el-form-item>
      </el-form>
      <div class="buttons">
        <el-button type="primary">提交申请</el-button>
        <el-button type="warning">提交中</el-button>
        <el-button type="success">证书已申请</el-button>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: 'detail',
  data() {
    return {
      companyInfo: {
        name: ''
      },
      code: ''
    }
  },
  methods: {
    getInfo() {
      this.$http.get('/personal/user/info').then(res => {
        if (res.status === 1) {
          let userInfo = res.data
          this.companyInfo = {
            id_card_number: userInfo.id_card_number,
            name: userInfo.name,
            bank_number: userInfo.bank_number,
            bank_phone: userInfo.bank_phone
          }
        }
      })
    }
  },
  mounted() {
    this.getInfo()
  }
}
</script>
<style lang="less" scoped>
.form {
  width: 500px;
  margin: 40px auto;
}
</style>